package com.kuang.pojo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

@Data //这跟lombok有关,至于干了什么我也不懂(这就是用于替换属性的get set方法的)例如:employee.getId()
//@AllArgsConstructor //有参无参的配置(这就是构造函数)如果你的构造器不是默认的就别在这里写了,例如birth 生日属性,需要设置默认值,就必须自己手写构造函数了
@NoArgsConstructor //有参无参的配置(这就是构造函数)
public class Employee {//员工表
    private Integer id;
    private String lastName;
    private String email;
    private Integer gender;//性别,女0,男1

    private Department department;//部门
    private Date birth;//不用sql版的,生日

    public Employee(Integer id, String lastName, String email, Integer gender, Department department) {
        this.id = id;
        this.lastName = lastName;
        this.email = email;
        this.gender = gender;
        this.department = department;
        this.birth = new Date();//给属性默认值
    }
}
